<template>
	<view class="review">
		<image class="item-bgImg" src="../../static/1.jpg" mode=""></image>
		<view class="check-in">
			<button> 签到</button>
		</view>
		<view class="study">
			<button class="btn" @click="gotoVoc('learn')"> Learn {{learnCount}}</button>
			<button class="btn" @click="gotoVoc('Review')"> Review {{reviewCount}} </button>
		</view>
	</view>
</template>

<script>	// 按需导入 mapState 辅助函数
	import {
		mapState
	} from 'vuex'

	export default {
		
		name: "review-detail",
		computed: {
			// 将 m_user 模块中的 reviewCount 映射到当前页面中使用
			...mapState('user', ['reviewCount','learnCount']),
		},
		data() {
			return {};
		},
		methods: {
			gotoVoc(type){
				uni.navigateTo({
					url:'/subpkg/review_voc/review_voc?type=' + type
				})
			}
		},
	}
</script>

<style lang="scss">
	.review {
		height: 100%;

		.item-bgImg {
			height: 100%;
			width: 100%;
			position: absolute;
			top: 0;
			left: 0;
			z-index: -1;
		}

		.check-in {
			height: 50%;
			display: flex;
			justify-content: center;
			align-items: center;

			button {
				background: rgba(255, 251, 240, 0.3);
				font-size: 20px;
				border-radius: 10px;
				width: 150px;
				padding: 20px 0;
			}
		}

		.study {
			height: 50%;
			display: flex;
			justify-content: center;
			align-items: center;

			.btn {
				background: rgba(255, 251, 240, 0.3);
				font-size: 20px;
				border-radius: 10px;
				width: 150px;
				padding: 10px 0;
			}
		}
	}
</style>
